

package usercodedeployment;

import com.hazelcast.map.EntryProcessor;

import java.io.Serializable;
import java.util.Map;

public class ClassWithTwoInnerClasses implements Serializable {
    public static class StaticNestedIncrementingEntryProcessor<K> implements EntryProcessor<K, Integer, Integer> {
        @Override
        public Integer process(Map.Entry<K, Integer> entry) {
            Integer origValue = entry.getValue();
            Integer newValue = origValue + 1;
            entry.setValue(newValue);
            return newValue;
        }
    }

    public static class StaticNestedDecrementingEntryProcessor<K> implements EntryProcessor<K, Integer, Integer> {
        @Override
        public Integer process(Map.Entry<K, Integer> entry) {
            Integer origValue = entry.getValue();
            Integer newValue = origValue - 1;
            entry.setValue(newValue);
            return newValue;
        }
    }
}
